const promise = new Promise((resolve, reject) => {
    // resolve('ok')
    reject('no')
})

promise.then(
    (res) => {
        console.log(res);
},
    (err) => {
        console.log(err);
    }
)

promise.catch(err => {
    console.log(err, 'err');
})
Promise.resolve(new Promise((resolve, reject) => {
    // ...promise
}))
.then()
.then(value => value)

new Promise((resolve, reject) => {
    setTimeout(() => {
        res
    })
})